<%@ page contentType="text/html; charset=utf-8"%>
<%@page import="com.icss.util.Constants"%>
每页<input type="text" id="page_num" name="page_num" value="16" style="width:30px;" onkeypress="keylog();"/>条
<script>
//检查每页显示页数
function checkPageValue(){
	var bool = true;
	var max_page_value = <%=Constants.MAX_PAGE_VALUE%>;
	var min_page_value = <%=Constants.MIN_PAGE_VALUE%>;
	var page_value = $('#page_num').val();
	if(page_value == ''){
		alert('每页显示不能为空!');
		$('#page_num').focus();
		$('#page_num').select();
		bool = false;
		return bool;
	}
	if(isNaN(page_value)){
		alert("每页显示为数字!");
		$('#page_num').focus();
		$('#page_num').select();
		bool = false;
		return bool;
	}else if(page_value.indexOf('.')!=-1){
	    alert("页码只能是正整数!");
		$('#page_num').focus();
		$('#page_num').select();
		bool = false;
		return bool;
	}
	var page_value_int = parseInt(page_value);
	if(page_value_int < min_page_value){
		alert('每页最少显示' + min_page_value + '条!');
		$('#page_num').focus();
		$('#page_num').select();
		bool = false;
		return bool;
	}
	if(page_value_int > max_page_value){
		alert('每页最多显示' + max_page_value + '条!');
		$('#page_num').focus();
		$('#page_num').select();
		bool = false;
		return bool;
	}
	return bool;
}
</script>